﻿using System.Windows.Forms;

public class TabControlHelp
{
    /// <summary>
    /// 添加
    /// </summary>
    /// <param name="tnSubNode"></param>
    public static void CloseTabControlPage(TabControl tabControlCenter, string tag)
    {
        foreach (TabPage tpTemp in tabControlCenter.Controls)
        {
            if (tpTemp.Tag != null && tpTemp.Tag as common.TabPageTag != null)
            {
                if (((tpTemp.Tag as common.TabPageTag).filename.ToString()) == tag)
                {
                    tpTemp.Dispose();
                }
            }
        }
    }
}